<?php


class Status Extends MY_Controller
{

	public function __construct()
	{
		parent::__construct();
		$this->layout_view = 'application_error';
		$this->load->library('authlink');
	}
	public function index()
	{
		show_404();
	}
	
	public function success($auth='')
	{
		//$this->disable_browser_cache = TRUE;
		//if($this->authlink->verify_authlink($auth) == TRUE && $this->session->userdata('enrollment_finished') == FALSE)
		//{
			$this->view_data['system_message'] = $this->session->flashdata('system_message');
			$this->view_data['login'] = $this->session->userdata('username');
			$this->session->set_userdata('enrollment_finished',TRUE);
		//}else{
			//redirect();
		//}
	}
	
	public function success2($auth='')
	{
		//$this->disable_browser_cache = TRUE;
		//if($this->authlink->verify_authlink($auth) == TRUE && $this->session->userdata('enrollment_finished') == FALSE)
		//{
			$this->view_data['system_message'] = $this->session->flashdata('system_message');
			$this->view_data['login'] = $this->session->userdata('username');
			$this->session->set_userdata('enrollment_finished',TRUE);
		//}else{
			//redirect();
		//}
	}
	
	public function error($auth)
	{
		$this->disable_browser_cache = TRUE;
		if($this->authlink->verify_authlink($auth) == TRUE && $this->session->userdata('enrollment_finished') == FALSE)
		{
			$this->view_data['system_message'] = $this->session->flashdata('system_message');
			$this->view_data['login'] = $this->session->userdata('username');
			$this->session->set_userdata('enrollment_finished',TRUE);
		}else{
			redirect();
		}
	}
}